home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / CallDel.3 < prev    next >
Encoding:
Text File  |  1994-12-17  |  2.1 KB  |  70 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) CallDel.3 1.4 94/12/17 16:17:08
  9. '\" 
  10. .so man.macros
  11. .HS Tcl_CallWhenDeleted tclc 7.0
  12. .BS
  13. .SH NAME
  14. .na
  15. Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interpreter is deleted
  16. .ad
  17. .SH SYNOPSIS
  18. .nf
  19. \fB#include <tcl.h>\fR
  20. .sp
  21. \fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  22. .sp
  23. \fBTcl_DontCallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  24. .SH ARGUMENTS
  25. .AS Tcl_InterpDeleteProc clientData
  26. .AP Tcl_Interp *interp in
  27. Interpreter with which to associated callback.
  28. .AP Tcl_InterpDeleteProc *proc in
  29. Procedure to call when \fIinterp\fR is deleted.
  30. .AP ClientData clientData in
  31. Arbitrary one-word value to pass to \fIproc\fR.
  32. .BE
  33.  
  34. .SH DESCRIPTION
  35. .PP
  36. \fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
  37. \fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
  38. time.  \fIProc\fR will be invoked just before the interpreter
  39. is deleted, but the interpreter will still be valid at the
  40. time of the call.
  41. \fIProc\fR should have arguments and result that match the
  42. type \fBTcl_InterpDeleteProc\fR:
  43. .nf
  44. .RS
  45. typedef int Tcl_InterpDeleteProc(
  46. .RS
  47. ClientData \fIclientData\fR,
  48. Tcl_Interp *\fIinterp\fR);
  49. .RE
  50. .RE
  51. .fi
  52. The \fIclientData\fP and \fIinterp\fR parameters are
  53. copies of the \fIclientData\fP and \fIinterp\fR arguments given
  54. to \fBTcl_CallWhenDeleted\fR.
  55. Typically, \fIclientData\fR points to an application-specific
  56. data structure that \fIproc\fR uses to perform cleanup when an
  57. interpreter is about to go away.
  58. \fIProc\fR does not return a value.
  59. .PP
  60. \fBTcl_DontCallWhenDeleted\fR cancels a previous call to
  61. \fBTcl_CallWhenDeleted\fR with the same arguments, so that
  62. \fIproc\fR won't be called after all when \fIinterp\fR is
  63. deleted.
  64. If there is no deletion callback that matches \fIinterp\fR,
  65. \fIproc\fR, and \fIclientData\fR then the call to
  66. \fBTcl_DontCallWhenDeleted\fR has no effect.
  67.  
  68. .SH KEYWORDS
  69. callback, delete, interpreter
  70.